home *** CD-ROM | disk | FTP | other *** search
- #define CURSES_LIBRARY 1
- #include <curses.h>
-
- #ifdef PDCDEBUG
- char *rcsid__putctty = "$Header: C:\CURSES\private\RCS\_putctty.c 2.1 1993/06/18 20:23:33 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- PDC_putctty() - Output a character and attribute in TTY fashion.
-
- PDCurses Description:
- This is a private PDCurses routine.
-
- Outputs character 'chr' to screen in tty fashion. If a colour
- mode is active, the character is written with colour 'colour'.
-
- This function moves the physical cursor after writing so the
- screen will scroll if necessary.
-
- PDCurses Return Value:
- This function returns OK on success and ERR on error.
-
- PDCurses Errors:
- No errors are defined for this function.
-
- Portability:
- PDCurses int PDC_putctty( chtype character, chtype color );
-
- **man-end**********************************************************************/
-
- int PDC_putctty( chtype character, chtype color )
- {
- #ifdef OS2
- int curRow = PDC_get_cur_row ();
- int curCol = PDC_get_cur_col ();
- #endif
-
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("PDC_putctty() - called\n");
- #endif
-
- #ifdef FLEXOS
- retcode = s_write(0x00, 0x01L, (_far char *) &character, 1L, 0);
- return( (retcode < 0L) ? ERR : OK );
- #endif
-
- #ifdef DOS
- regs.h.ah = 0x0e; /* Write in TTY fashion, advance cursor. */
- regs.h.al = (unsigned char) (character & A_CHARTEXT);
- regs.h.bh = _cursvar.video_page;
- regs.h.bl = (unsigned char) ((color & A_ATTRIBUTES) >> 8);
- int86(0x10, ®s, ®s);
- return( OK );
- #endif
-
- #ifdef OS2
- VioWrtTTY ((PCH)&character, 1, 0);
- VioWrtNAttr ((PBYTE)&color, 1, (USHORT)curRow, (USHORT)curCol, 0);
- return( OK );
- #endif
-
- #ifdef UNIX
- /* INCOMPLETE */
- return( OK );
- #endif
- }
-